منابع مشابه
Structural Polymorphism
This paper describes structural polymorphism, a new form of type polymorphism appropriate to functional languages featuring user-defined algebraic data types (e.g., Standard ML, Haskell and Miranda1). The approach extends the familiar notion of parametric polymorphism by allowing the definition of functions which are generic with respect to data structures as well as to individual types. For ex...
متن کاملMLF: An extension of ML with first-class polymorphism and implicit instantiation. (MLF : Une extension de ML avec polymorphisme de second ordre et instanciation implicite)
We propose a type system MLF that generalizes ML with first-class polymorphism as in System F. Expressions may contain second-order type annotations. Every typable expression admits a principal type, which however depends on type annotations. Principal types capture all other types that can be obtained by implicit type instantiation and they can be inferred. All expressions of ML are well-typed...
متن کاملOn Variance-Based Subtyping for Parametric Types
We develop the mechanism of variant parametric types, inspired by structural virtual types by Thorup and Torgersen, as a means to enhance synergy between parametric and inclusive polymorphism in object-oriented languages. Variant parametric types are used to control both subtyping between different instantiations of one generic class and the visibility of their fields and methods. On one hand, ...
متن کاملConcept-Controlled Polymorphism
Concepts—sets of abstractions related by common requirements— have a central role in generic programming. This paper proposes a general framework for using concepts to control polymorphism in different ways. First, concepts can be used to constrain parametric polymorphism, as exemplified by type classes in Haskell. Second, concepts can be used to provide fine-grained control of function and ope...
متن کاملA Theory of Parametric Polymorphism and an Application ; A formalisation of parametric polymorphism within and about dependent type-theory, and an application to property-based testing
This thesis revisits the well-known notion of parametric polymorphism in the light of modern developments in type-theory. Additionally, applications of parametric polymorphism are also presented. The first part of the thesis presents a theoretical investigation of the semantics of parametric polymorphism of and within type-theories with dependent types. It is shown how the meaning of polymorphi...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 1991